package com.lx.entity.vo;

import java.util.Date;

/**
 * @title: TradeAndCardInfoVO
 * @projectName bankManage
 * @description: TODO
 * @author: yuanChu
 * @date: 2022/5/8  13:48
 */
public class TradeAndCardInfoVO {
    private String cardId;
    private Double transMoney;
    private Date transTime;
    private Integer businessType;
    private String remark;

    public TradeAndCardInfoVO() {
    }

    public TradeAndCardInfoVO(String cardId, Double transMoney, Date transTime, Integer businessType, String remark) {
        this.cardId = cardId;
        this.transMoney = transMoney;
        this.transTime = transTime;
        this.businessType = businessType;
        this.remark = remark;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }


    public Double getTransMoney() {
        return transMoney;
    }

    public void setTransMoney(Double transMoney) {
        this.transMoney = transMoney;
    }

    public Date getTransTime() {
        return transTime;
    }

    public void setTransTime(Date transTime) {
        this.transTime = transTime;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    private String getBusinessType(Integer businessType) {
        switch (businessType) {
            case 1:
                return "存款";
            case 2:
                return "取款";
            case 3:
                return "转账";
            default:
                return "未知交易类型";
        }
    }

    @Override
    public String toString() {
        return "卡号:" + cardId +
                "\t  交易金额:" + transMoney +
                "\t  交易时间:" + transTime +
                "\t  交易类型:" + getBusinessType(businessType) +
                "\t  备注:" + remark;
    }
}
